package cn.com.cennavi.fileMake;

/**
 * lanetopo对象
 * 
 * @author Thinkpad
 *
 */
public class LaneTopoBean {
	public String ID;
	public String inLaneID;
	public String outLaneID;
	public String inLinkID;
	public String NodeID;
	public String outLinkID;
	public String ArrowInfo;
	public String PassLane;
	public String PassLane2;
	public String Work_flag;
	/**
	 * 车道所在车道序列，从左往右，1、2、3...
	 */
	public String inLaneIDNo;
	/**
	 * 车道所在车道序列，从左往右，1、2、3...
	 */
	public String outLaneIDNo;
	/**
	 * 所属link的车道总数
	 */
	public int inlinkSeqNo;
	/**
	 * 所属link的车道总数
	 */
	public int outLinkSeqNo;
	/**
	 * 转向箭头
	 */
	public String inLaneArrow_Dir;
	/**
	 * 转向箭头
	 */
	public String outLaneArrow_Dir;

	/**
	 * 解析字符串
	 * 
	 * @param line
	 * @return
	 */
	public static LaneTopoBean parseData(String line) {
		String[] lineArr = line.split(",");
		if (lineArr.length == 10) {
			LaneTopoBean data = new LaneTopoBean();
			data.ID = lineArr[0].replace("\"", "").trim();
			data.inLaneID = lineArr[1].replace("\"", "").trim();
			data.outLaneID = lineArr[2].replace("\"", "").trim();
			data.inLinkID = lineArr[3].replace("\"", "").trim();
			data.NodeID = lineArr[4].replace("\"", "").trim();
			data.outLinkID = lineArr[5].replace("\"", "").trim();
			data.ArrowInfo = lineArr[6].replace("\"", "").trim();
			data.PassLane = lineArr[7].replace("\"", "").trim();
			data.PassLane2 = lineArr[8].replace("\"", "").trim();
			data.Work_flag = lineArr[9].replace("\"", "").trim();
			return data;
		}
		return null;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
